Relay migrated simulation schema services from flow360-schema#2000
Merged
benflexcompute merged 11 commits intomainfrom Apr 19, 2026
Merged
Conversation
Add `# pylint: disable=unused-import` to relay-only files whose re-exported symbols are consumed by compute pipeline scripts. Remove genuinely unused `materialize_entities_and_selectors_in_place` import from services.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep only relay exports consumed by external compute scripts (_parse_root_item_type_from_simulation_json, apply_simulation_setting_to_entity_info, get_default_params, merge_geometry_entity_info, update_simulation_json). Remove 15 symbols with no internal or external callers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 355d0ef. Configure here.
…ma-migration-batch-1-client-main-v2
Schema package unified version handling via flow360_schema.__version__
(see plans/schema_version_unification.markdown); the constant no longer
exists in flow360_schema.models.simulation.framework.updater{,_utils}.
Drop the dead imports so pylint passes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 test modules import clear_context from services.py, and test_value_or_expression.py also imports initialize_variable_space. The relay cleanup dropped both, causing collection-time ImportError on macOS CI. Re-add them from their schema-side origins. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR 09a23b9 removed 'import flow360.component.simulation.units as u' when deleting test_default_params_for_local_test, but two surviving tests (test_mach_muref_op_cond, test_transformation_matrix) still reference u.K / u.deg / u.m. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Coverage report (flow360)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
angranl-flex
approved these changes
Apr 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changed
flow360/component/simulation/into thin relays over schema-owned implementationsservices_utilsWhy
The migration target is for the client to keep runtime-only responsibilities such as translator orchestration, web API code, BET wrappers, and unit-switching, while schema owns Pydantic behavior, validation, and deserialization.
This PR is the final replacement client migration batch re-rooted onto the true current
main.Impact
Validation
python -m py_compile flow360/component/simulation/services.py flow360/component/simulation/services_utils.py flow360/component/simulation/conversion.py flow360/component/simulation/utils.py flow360/component/simulation/framework/updater.py flow360/component/simulation/framework/updater_functions.py flow360/component/simulation/framework/updater_utils.pyflow360-schemapackage during developmentPaired Schema PR
Remaining Work From Plan
unit_system.py/exposed_units.pyonly after confirming real remaining consumerstests/simulation/params/test_validators_params.pyandtests/simulation/services/test_selector_expansion_validators.pyFollow-up
This PR supersedes #1998 and #1999 for review against
main. The remaining items should be finished in a follow-up PR rather than expanding this one further.Note
Medium Risk
This rewires core simulation validation/updater/unit-conversion utilities to delegate to
flow360-schema, so runtime behavior now depends on the bumped schema package and could change subtly across validation, migrations, and serialization boundaries.Overview
Most of
flow360/component/simulation/is converted from local implementations into thin relay modules that re-export schema-owned logic (unit conversion helpers, updater orchestration and helpers, utility functions, and key service entry points likevalidate_model, defaults, and simulation-json update/apply helpers).Client-owned duplicate logic and related reference fixtures/tests are removed, and the
flow360-schemadependency is bumped to25.10.2b1to supply the migrated behavior.Reviewed by Cursor Bugbot for commit 5ca8ca7. Bugbot is set up for automated code reviews on this repo. Configure here.